package com.ooqiu.gaming.utils;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.content.LocalBroadcastManager;

/**
 * @author Eenie
 * @date 2017/12/7
 */

public class LocalBroadcastManagerUtil {

    public static void post(Context context, String action) {
        LocalBroadcastManager.getInstance(context).sendBroadcast(new Intent(action));
    }

    public static void post(Context context, String action, Bundle bundle) {
        LocalBroadcastManager.getInstance(context).sendBroadcast(new Intent(action).putExtra("extra", bundle));
    }

}
